#ifndef CONVSP2TAB_HPP
#define CONVSP2TAB_HPP

/*--------------------------------------------------------------------------------------------------------------
 * INCLUDES
 *-------------------------------------------------------------------------------------------------------------*/
#include <vector>
#include <fstream>
#include <iostream>

#include "GlobTypes.hpp"
#include "Utils.hpp"

namespace cc 
{
	/*--------------------------------------------------------------------------------------------------------------
    * CLASS: CONVSP2TAB
    *--------------------------------------------------------------------------------------------------------------*/  
	class ConvSp2Tab
    {
    /*--------------------------------------------------------------------------------------------------------------
    * PRIVATE TYPES
    *--------------------------------------------------------------------------------------------------------------*/  
	private:		
		typedef std::vector<UInt_t>								Lengs_t;
		typedef std::vector<Str_t>								File_t;

	/*--------------------------------------------------------------------------------------------------------------
    * PRIVATE ATTRIBUTES
    *--------------------------------------------------------------------------------------------------------------*/  
	private:		
		File_t													m_file;
		Lengs_t													m_lengs;
		CoCStr_t												m_in_path;
		CoCStr_t												m_out_path;
		CoCStr_t												m_lengs_path;

	/*--------------------------------------------------------------------------------------------------------------
    * PRIVATE METHODS
    *--------------------------------------------------------------------------------------------------------------*/  
	private:
		bool					loadLengs						(CoCStr_t lengs_path, Lengs_t& lengs);
		bool					loadIn							(CoCStr_t in_path, File_t& file);

	/*--------------------------------------------------------------------------------------------------------------
    * PUBLIC METHODS
    *--------------------------------------------------------------------------------------------------------------*/  
	public:
								ConvSp2Tab						(CoCStr_t in_path, CoCStr_t lengs_path, CoCStr_t out_path);
								~ConvSp2Tab						(void);
		bool					Conv							(void);
		bool					Save							();
	};
}

#endif //CONVSP2TAB_HPP